﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace DAO
{
    public class DataProvider
    {
        static public SqlConnection ConnectDB()
        {
            SqlConnection conn = new SqlConnection();
            String dbname = "BANSACH";
            String user = "sa";
            String pass = "1";
            string strconn = @"Server=; DataBase=" + dbname + "; User ID =" + user + " ; Password = " + pass;
            //string strconn = @"Data Source=.\SQLEXPRESS1;AttachDbFilename=|DataDirectory|BanSach.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";
            //string strconn = @"Data Source=.\SQLEXPRESS1;AttachDbFilename=O:\Nhap Mon CNPM 11HT\DoAn\BanSach.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";            
            conn.ConnectionString = strconn;
            return conn;
        }
    }
}
